package com.developer.weatherdata.model;

import java.io.Serializable;

import com.developer.weatherdata.R;

public class Weather implements Serializable {

	private String icon;
	private long time;
	private double temperature;
	private double humidity;
	private double pricipitationChance;
	private String summary;
	private String timeZone;

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}
	
	public int getIconId(){
		int iconId = -1;
        if (icon.equals("clear-day")) {
            iconId = R.drawable.clear_day;
        } else if (icon.equals("clear-night")) {
            iconId = R.drawable.clear_night;
        } else if (icon.equals("rain")) {
            iconId = R.drawable.rain;
        } else if (icon.equals("snow")) {
            iconId = R.drawable.snow;
        } else if (icon.equals("sleet")) {
            iconId = R.drawable.sleet;
        } else if (icon.equals("wind")) {
            iconId = R.drawable.wind;
        } else if (icon.equals("fog")) {
            iconId = R.drawable.fog;
        } else if (icon.equals("cloudy")) {
            iconId = R.drawable.cloudy;
        } else if (icon.equals("partly-cloudy-day")) {
            iconId = R.drawable.partly_cloudy;
        } else if (icon.equals("partly-cloudy-night")) {
            iconId = R.drawable.cloudy_night;
        }
        return iconId;
	}

	public long getTime() {
		return time;
	}

	public void setTime(long time) {
		this.time = time;
	}

	public double getTemperature() {
		return temperature;
	}

	public void setTemperature(double temperature) {
		this.temperature = temperature;
	}

	public double getHumidity() {
		return humidity;
	}

	public void setHumidity(double humidity) {
		this.humidity = humidity;
	}

	public double getPricipitationChance() {
		return pricipitationChance;
	}

	public void setPricipitationChance(double pricipitationChance) {
		this.pricipitationChance = pricipitationChance;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public String getTimeZone() {
		return timeZone;
	}

	public void setTimeZone(String timeZone) {
		this.timeZone = timeZone;
	}

	@Override
	public String toString() {
		return "Weather [icon=" + icon + ", time=" + time + ", temperature=" + temperature + ", humidity=" + humidity + ", pricipitationChance=" + pricipitationChance
				+ ", summary=" + summary + ", timeZone=" + timeZone + "]";
	}

}
